<div class="generated-url-container" 
    th:attr="data-source-field=*{fields['__${field.name}__'].attributes[sourceField]},
             data-toggle-field=*{fields['__${field.name}__'].attributes[toggleField]},
             data-overridden-url=*{fields['__${field.name}__'].attributes[overriddenUrl] == true}"
    th:with="overriddenUrl=*{fields['__${field.name}__'].attributes[overriddenUrl] == true}">

    <div class="override-label">
        <label th:for="*{fields['__${field.name}__'].value}" th:classappend="${field.required ? 'required' : ''}" >
            <span th:utext="#{${field.friendlyName}}"></span>
<span th:replace="components/fieldTooltip" ></span>
        </label>

        <a class="override-generated-url" href="#" th:text="'(' + #{Override_Generated_URL-__${overriddenUrl ? 'enabled' : 'disabled'}__} + ')'"
           th:disabled="${field.readOnly}"
           th:unless="*{fields['__${field.name}__'].attributes[isPath]}"
           th:attr="data-enabled=${overriddenUrl},
                 data-enabled-text=${'(__#{Override_Generated_URL-enabled}__)'},
                 data-disabled-text=${'(__#{Override_Generated_URL-disabled}__)'}" ></a>

        <a class="override-generated-url" href="#" th:text="'(' + #{Override_Generated_Path-__${overriddenUrl ? 'enabled' : 'disabled'}__} + ')'"
           th:disabled="${field.readOnly}"
           th:if="*{fields['__${field.name}__'].attributes[isPath]}"
           th:attr="data-enabled=${overriddenUrl},
                 data-enabled-text=${'(__#{Override_Generated_Path-enabled}__)'},
                 data-disabled-text=${'(__#{Override_Generated_Path-disabled}__)'}" ></a>
    </div>

    <input type="text" class="target-field"
        th:disabled="${field.readOnly}"
        th:required="${field.required}" 
        th:placeholder="${field.hint}"
        th:field="*{fields['__${field.name}__'].value}"
        th:attr="data-prefix=*{fields['__${field.name}__'].attributes[prefix]},
                 data-allow-slash=*{fields['__${field.name}__'].attributes[allowSlash]},
                 data-prefix-selector=*{fields['__${field.name}__'].attributes['prefix-selector']}"
        th:readonly="${!overriddenUrl}" />

    <span class="error" th:errors="*{fields['__${field.name}__'].value}" ></span>
</div>